/**
 * 
 */
package antsclub.common.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author Kyle Yuan
 *
 */
public class DateUtil {

	/**
	 * 格式化日期
	 * 
	 * @param date
	 * @param pattern
	 * @return
	 */
	public static String formatDate(Date date, String pattern) {
		SimpleDateFormat format = new SimpleDateFormat(pattern);
		return format.format(date);
	}

	public static void main(String[] args) {
		System.out.println(formatDate(new Date(), ConstUtil.YMD_DASH_WITH_FULL_TIME));
	}
}
